import QtQuick

ListView{
    spacing: 4
    model: ListModel{
        ListElement{info:"水平靠左";vAlign: Text.AlignTop;hAlign: Text.AlignLeft}
        ListElement{info:"水平居中";vAlign: Text.AlignTop;hAlign: Text.AlignHCenter}
        ListElement{info:"水平靠右";vAlign: Text.AlignTop;hAlign: Text.AlignRight}

        ListElement{info:"垂直靠上";vAlign: Text.AlignTop;hAlign: Text.AlignLeft}
        ListElement{info:"垂直居中";vAlign: Text.AlignVCenter;hAlign: Text.AlignLeft}
        ListElement{info:"垂直靠下";vAlign: Text.AlignBottom;hAlign: Text.AlignLeft}
    }
    delegate: Rectangle{
        width: 100
        height: 60
        color: "#ffcc66"
        radius: 6

        property int v: vAlign
        property int h: hAlign
        Text{
            id: text
            anchors.fill: parent
            text: info
            horizontalAlignment: parent.h
            verticalAlignment: parent.v
        }
    }
}
